(:: pragma bea:global-element-parameter parameter="$submitOrderResponse1" element="ns1:SubmitOrderResponse" location="../WSDLs/SubmitOrder.wsdl" ::)
(:: pragma bea:global-element-return element="ns2:activateNewCustomerResponse" location="../WSDLs/ImplWSMVNOInterface.wsdl" ::)

declare namespace ns2 = "http://ws.ejb.websrv.impl.css.amdocs.com";
declare namespace ns1 = "http://www.example.org/SubmitOrder/";
declare namespace ns3 = "http://datatypes.sl.mvno.ws.impl.css.amdocs.com";
declare namespace ns0 = "http://datatypes.util.ws.impl.css.amdocs.com";
declare namespace xf = "http://tempuri.org/ActivateNewCustomer/Transformation/test/";

declare function xf:test($submitOrderResponse1 as element(ns1:SubmitOrderResponse))
    as element(ns2:activateNewCustomerResponse) {
        <ns2:activateNewCustomerResponse>
            <ns2:activateNewCustomerReturn>
                <ns3:activateServiceResponse>
                    <ns3:customerId>{ data($submitOrderResponse1/customerId) }</ns3:customerId>
                    <ns3:orderId>{ data($submitOrderResponse1/orderId) }</ns3:orderId>
                    <ns3:serviceId>{ data($submitOrderResponse1/serviceId) }</ns3:serviceId>
                </ns3:activateServiceResponse>
            </ns2:activateNewCustomerReturn>
        </ns2:activateNewCustomerResponse>
};

declare variable $submitOrderResponse1 as element(ns1:SubmitOrderResponse) external;

xf:test($submitOrderResponse1)